package com.jasony.tools.excel;

import com.jasony.tools.excel.typehandler.*;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * @Auther youqin
 * @Create 2018/12/4 上午11:46
 **/
public class ExcelProperties {
    private static Map<Class, TypeHandler> typeHandlers;


    static {
        typeHandlers = new HashMap<>(16);
        typeHandlers.put(Double.class, new DoubleTypeHandler());
        typeHandlers.put(String.class, new StringTypeHandler());
        typeHandlers.put(Date.class, new DateTypeHandler());
        typeHandlers.put(Long.class, new LongTypeHandler());
        typeHandlers.put(LocalDate.class, new LocalDateTypeHandler());
        typeHandlers.put(LocalDateTime.class, new LocalDateTimeTypeHandler());
        typeHandlers.put(Float.class, new FloatTypeHandler());
        typeHandlers.put(Integer.class, new IntegerTypeHandler());
    }

    public static Map<Class, TypeHandler> getTypeHandlers() {
        return typeHandlers;
    }
}
